package org.ztr.yanai.blog.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.ztr.yanai.blog.enums.UserRoleEnum;
import org.ztr.yanai.blog.enums.UserStatusEnum;

import java.time.LocalDateTime;

/**
 * @Author: ZhaoTR
 * @Date: Created in 2025/11/22 14:30
 * @Description: 用户数据传输对象，用于对外展示用户信息（隐藏敏感字段）
 * @Version: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "用户信息DTO")
public class UserDTO {

    @Schema(description = "用户ID")
    private Long id;

    @Schema(description = "用户名")
    private String username;

    @Schema(description = "邮箱")
    private String email;

    @Schema(description = "头像URL")
    private String avatar;

    @Schema(description = "用户角色")
    private UserRoleEnum role;

    @Schema(description = "用户状态")
    private UserStatusEnum status;

    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @Schema(description = "最后登录时间")
    private LocalDateTime lastLogin;
}
